Improving Test Suites via Generated Specifications
نویسنده
چکیده
This thesis presents a specification-based technique for generating, augmenting, and minimizing test suites. The technique is automatic but assumes the existence of a test case generator. The technique dynamically induces specifications from test suite executions. Test suites can be generated by adding cases until the induced specification stops changing. The resulting test suites have better fault detection than suites of the same size with 100% branch coverage. Augmenting an existing test suite, such as a code-covering suite, also increases its fault detection. Minimizing test suites while holding the generated specification constant compares favorably to previously-known techniques. These positive results can be explained by two insights, which the thesis also justifies experimentally. First, given an a priori specification (an oracle), the specification coverage of a test suite compares the suite’s induced specification with the oracle. Experiments show that specification coverage is correlated with fault detection, even when test suite size and code coverage are held constant. Second, when tests are added at random to a suite, specification coverage increases rapidly, then levels off at a high value. Even without knowing the ideal specification that would be induced by all possible tests, it is possible to produce a specification very near that one. The thesis’s test suite generation and augmentation technique increases the specification coverage of the test suite, but without knowing the oracle specification and without examining the code. In addition to improving fault detection, the technique generates a specification close to the oracle, which has many benefits in itself. This technical report is a reformatted version of the author’s Masters thesis of the same title, published by MIT in May, 2002. He was advised by Michael Ernst, Assistant Professor of Electrical Engineering and Computer Science.
منابع مشابه
A probabilistic alternative to regression suites
Automated regression suites are essential in developing large applications, while maintaining reasonable quality and timetables. Themain argument against the automation of regression suites, in addition to the cost of creation and maintenance, is the observation that if you run the same test many times, it becomes increasingly less likely to find bugs. To alleviate such problems, a new regressi...
متن کاملImproving Generation of Object-Oriented Test Suites by Avoiding Redundant Tests
Object-oriented tests consist of sequences of method invocations. Behavior of an invocation depends on the state of the receiver object and method arguments at the beginning of the invocation. Existing tools for automatic generation of object-oriented test suites, such as Jtest and JCrasher for Java, typically ignore object states. These tools generate redundant tests that exercise the same met...
متن کاملQuality assurance of test specifications for reactive systems
Extensive testing of modern communicating systems often involves large and complex test suites that need to be maintained throughout the life cycle of the tested systems. For this purpose, quality assurance of test suites is an inevitable task that eventually may have an impact on the quality of the system under test as well. In this thesis, we present a holistic method towards the analytical q...
متن کاملDo Automatically Generated Unit Tests Find Real Faults? An Empirical Study of Effectiveness and Challenges
Rather than tediously writing unit tests manually, tools can be used to generate them automatically — sometimes even resulting in higher code coverage than manual testing. But how good are these tests at actually finding faults? To answer this question, we applied three state-of-the-art unit test generation tools for Java (Randoop, EvoSuite, and Agitar) to the 357 real faults in the Defects4J d...
متن کاملSelecting Test Sequences for Partially-specified Nondeterministic Finite State Machines1
In order to test the control portion of communication software, specifications are usually first abstracted to state machines, then test cases are generated from the resulting machines. The state machines obtained from the specification are often both partially-specified and nondeterministic. We come out with a method of generating test suites for the software that is modeled by partially-speci...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2002